Last Updated 10/28/2022

Sage Essentials
Section 1: Numerical Calculations

Functions

Example 1 Define a function

Simply enter the mathematical notation of a function to define it in Sage.

To define f(x)=x2+x +1, we enter:

Once f(x) is defined, we can perform operations on it. For example, we can evaluate f at different values of x.


← Previous Example Next Example →